package ecmnext.gclient;

/***************************************************************/
/*                     SOFTWARE SECTION                        */
/***************************************************************/
/*
 * <p>Name: ECMNext</p>
 * <p>Description: Simulation of the platform of trading Software</p>
 * <p>Licence: General Public License</p>
 * <p>Organisation: EC Marseille</p>
 * <p>Persons involved in the project : groupe Plateforme de Trading</p>
 * <p>Current version: 1.0</p>
 */

/***************************************************************/
/*                       IMPORT SECTION                        */
/***************************************************************/
import java.awt.*;


import javax.swing.*;

import ecmnext.gclient.gui.*;
import java.io.File;
import java.net.URL;


/***************************************************************/
/*              ECMNextyClient CLASS SECTION                      */
/***************************************************************/
/**
 * <p>Title : ECMNextClient</p>
 * <p>Description :</p>
 * @author Xuewen YANG ET Antoine COUDERC
 * @version 1.0
 */

public class ECMNextClient {
  boolean packFrame = false;
  //see main below
  //public static URL lookAndFeelURL;

  //Construct the application
  public ECMNextClient() {

    GClientFrame frame = new GClientFrame();
    //Validate frames that have preset sizes
    //Pack frames that have useful preferred size info, e.g. from their layout
    if (packFrame) {
      frame.pack();
    }
    else {
      frame.validate();
    }
    //adapt the window and put the frame in the center of the screen
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    if (frameSize.height > screenSize.height) {
      frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width) {
      frameSize.width = screenSize.width;
    }
    frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
    frame.setVisible(true);
  }

  //Main method
  public static void main(String[] args) {
    try {
    	
    }
    catch (Exception e) {
      e.printStackTrace();
    }
    new ECMNextClient();
  }
}
